# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1MetadataSchema do
  @moduledoc """
  Instance of a general MetadataSchema.

  ## Attributes

  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp when this MetadataSchema was created.
  *   `description` (*type:* `String.t`, *default:* `nil`) - Description of the Metadata Schema
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the MetadataSchema.
  *   `schema` (*type:* `String.t`, *default:* `nil`) - Required. The raw YAML string representation of the MetadataSchema. The combination of [MetadataSchema.version] and the schema name given by `title` in [MetadataSchema.schema] must be unique within a MetadataStore. The schema is defined as an OpenAPI 3.0.2 [MetadataSchema Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#schemaObject)
  *   `schemaType` (*type:* `String.t`, *default:* `nil`) - The type of the MetadataSchema. This is a property that identifies which metadata types will use the MetadataSchema.
  *   `schemaVersion` (*type:* `String.t`, *default:* `nil`) - The version of the MetadataSchema. The version's format must match the following regular expression: `^[0-9]+.+.+$`, which would allow to order/compare different versions. Example: 1.0.0, 1.0.1, etc.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :createTime => DateTime.t() | nil,
          :description => String.t() | nil,
          :name => String.t() | nil,
          :schema => String.t() | nil,
          :schemaType => String.t() | nil,
          :schemaVersion => String.t() | nil
        }

  field(:createTime, as: DateTime)
  field(:description)
  field(:name)
  field(:schema)
  field(:schemaType)
  field(:schemaVersion)
end

defimpl Poison.Decoder, for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1MetadataSchema do
  def decode(value, options) do
    GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1MetadataSchema.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1MetadataSchema do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
